package com.qqn.acknowledge.reflection;


import java.util.List;

/**
 * @ClassName: User
 * @Description: 用来供测试反射访问的类
 * @Author: 刘神仙
 * @Date: 2025-03-25 20:38
 */
public class User extends Person {
    public String name;

    private final int age;

    public String email;

    public Message message;

    private List<String> comments;

    public static int publicStaticField = 1; //

    private static int privateStaticField = 10;

    static {
        System.out.println("UserClass is initialized");
    }

    public User(String name, int age) {
        this.name = name;
        this.age = age;
    }
    @Autowired
    public User(Message message) {
        this.age = 18;
        this.message = message;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public String getEmail() {
        return email;
    }
    public void myPublicMethod() {
        System.out.println("This is a public method");
    }

    private void myPrivateMethod() {
        System.out.println("This is a private method");
    }

    private void myPrivateMethod(String content, String mark) {
        System.out.println("This is a private method with parameters. " + content + " " + mark);
    }

    public static void myPublicStaticMethod() {
        System.out.println("This is a public static method");
    }

    private static void myPrivateStaticMethod() {
        System.out.println("This is a private static method");
    }

    private static void myPrivateStaticMethod(String content) {
        System.out.println("This is a private static method with parameters. " + content);
    }

}
